import request from "../http/http";

export const GoodsApi = {
  getList: (id: number) => {
    return request({
      method: "get",
      url: "/api/Wap/listByStoreId/" + id,
    });
  },
  createOrder: (data: any) => {
    return request({
      method: "post",
      url: "/api/Wap/orders/create_store_order_new",
      data,
    });
  },
  addCartNew: (data: any) => {
    return request({
      method: "post",
      url: "/api/user/addCartNew",
      data,
    });
  },
  addCartMore: (data: any) => {
    return request({
      method: "post",
      url: "/api/user/addCartMore",
      data,
    });
  },
  getCartList: (data: any) => {
    return request({
      method: "get",
      url: "/api/user/getCartList",
      params: data,
    });
  },
  delCart: (data: any) => {
    return request({
      method: "post",
      url: "/api/user/delCart",
      data: data,
    });
  },
  setOrder: (data: any) => {
    return request({
      method: "post",
      url: "/api/user/setOrder",
      data: data,
    });
  },
  getProductCombin: (data: any) => {
    return request({
      method: "post",
      url: "/api/Wap/orders/getProductCombin",
      data: data,
    });
  },
};
